package cn.shafish.dubbo.xml.consumerxml.controller;

import cn.shafish.serviceapi.service.UserRpcService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("xml")
public class UserController {
    @Resource
    private UserRpcService userRpcService;

    @GetMapping("get")
    public String get(Integer id) {
        return userRpcService.getUser(id).toString();
    }
}
